PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


SetTheme

Sets a specified collection as the current theme.

pascal OSStatus SetTheme (
                     Collection ioCollection);
ioCollection
A value of type Collection . Pass a reference to a collection object, such as that created by calling the Collection Manager function NewCollection . Before calling SetTheme , set the collection to contain theme data that you wish to use for the current theme. The theme data is in the form of collection items, each corresponding to an attribute of the theme. For a given theme, the actual number of collection items may vary, depending upon how fully the theme's attributes are specified. Your application can use theme collection tags, along with various Collection Manager functions, to access the data in the collection. See Theme Collection Tags for descriptions of the possible theme collection items. See Inside Macintosh: QuickDraw GX Environment and Utilities for a discussion of collections.
function result
A result code; see Result Codes .
DISCUSSION

The SetTheme function sets the attributes of the current theme. You may use SetTheme to set up a custom theme environment for your application, to be used only when your application is active. You may also use SetTheme to create a theme environment that you want to be user-selectable and to have systemwide effect. See Creating Custom Themes for more details on these processes.

Your application can use the GetTheme function to obtain a collection containing a copy of the data for the current theme.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)